package com.fs.niukewang.huawei;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;

/**
 * @program:
 * @description:
 * @author: hyq
 * @create: 2021-03-17 20:15
 */
public class chongfushu {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String num = br.readLine();
        StringBuffer sb2 = new StringBuffer(num).reverse();
        char[] cc = sb2.toString().toCharArray();
        Map<Character,Integer> map = new HashMap<>();
        StringBuffer sb = new StringBuffer();
        for(int i =0;i<cc.length;i++){
            Integer j = map.get(cc[i]);
            if(j == null){
                sb.append(cc[i]);
            }
            map.put(cc[i],i);
        }

        System.out.println(sb.toString());
    }
}
